package com.ostrich.cloud.common.exceptions;

import com.ostrich.cloud.common.resultcode.ResultCode;

public class OstrichException extends RuntimeException {

    private Integer code;

    public OstrichException(ResultCode errorCode) {
        super(errorCode.getMessage());
        this.code = errorCode.getCode();
    }

    public OstrichException(String msg, Integer code) {
        super(msg);
        this.code = code;
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
